function F = sd_loge_int(k_j, sigma)

fun1= @(x, k) ((x .*exp(x-1)).^(k-1)) .* ((1+x).*exp(x-1)) .* (log(1-x)); 
fun2= @(x, k) (2.* log(x .*exp(x-1)) .* log(1-x) + ((log(1-x)).^2)) .* ((x .*exp(x-1)).^(k-1)) .* ((1+x).*exp(x-1)); 

Integral1 = integral(@(x)fun1(x,k_j),0,1);
Integral2 = integral(@(x)fun2(x,k_j),0,1);
mu=-(1./k_j)+k_j .* Integral1;
sigmatheory = sqrt((2./((k_j).^(2))) - ((mu).^2) + k_j.* Integral2);
F = sigmatheory-sigma;

